<li>
    <div class="num"><?= $fields['counter']->content ?></div>
    <div class="outOfNum"><?= $fields['title']->content ?>
        <small><?= $fields['body']->content ?></small>
        <small>
            <? $tags = $fields['field_tags']->content ?>
            <?= strlen($tags) ? 'Метки: ' . $tags : '' ?>
        </small>
    </div>
</li>